package com.beyondsoft.sabg.edu.model.db;

import com.beyondsoft.sabg.edu.model.db.core.BasicEntity;
import com.beyondsoft.sabg.edu.model.db.core.UserAccount;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import javax.validation.constraints.Size;

/**
 * @Author Mo cr
 * @Date 2023/8/7
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = true)
@Table(name = "nothing-teacher")
public class TeacherInfo extends BasicEntity {
    @JsonIgnore
    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "user_id")
    private UserAccount userAccount;
    @Column(unique = true)
    private String teacherNumber;
    @Size(max = 30)
    private String teacherName;
    // 取自全校人员表的二级单位代码
    private Long teacherCollegeId;
    @Size(max = 30)
    private String teacherCollege;
    // 1 导师 2 辅导员 3 副书记
    private int teacherPosition;
    @Size(max = 10)
    private String teacherPositionName;




}
